package com.example.maoyanmovie.network;

import com.example.maoyanmovie.model.CinemaResponse;
import com.example.maoyanmovie.model.ComingResponse;
import com.example.maoyanmovie.model.MovieResponse;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface ApiService {

    // 获取正在热映的电影列表
    @GET("ajax/movieOnInfoList")
    Observable<MovieResponse> getHotMovies();

    // 获取即将上映的电影列表
    @GET("ajax/comingList")
    Observable<ComingResponse> getComingMovies(
            @Query("ci") int cityId,
            @Query("token") String token,
            @Query("limit") int limit
    );

    // 获取影院列表
    @GET("ajax/filterCinemas")
    Observable<CinemaResponse> getCinemas(@Query("ci") int cityId);
}
